cmake_minimum_required(VERSION 2.8)

project(KafkaConsumer)

set(CMAKE_CXX_STANDARD 11)
#set(CMAKE_CXX_COMPILER "g++")
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
#set(CMAKE_INCLUDE_CURRENT_DIR ON)

# Kafka头文件路径
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../include/librdkafka)
# Kafka库路径
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../lib)

aux_source_directory(. SOURCE)

#add_executable(${PROJECT_NAME} ${SOURCE})

#TARGET_LINK_LIBRARIES(${PROJECT_NAME} rdkafka++)

ADD_EXECUTABLE(${PROJECT_NAME} main.cpp KafkaConsumer.cpp) 
TARGET_LINK_LIBRARIES(${PROJECT_NAME} rdkafka++)

